package com.example.eurekaserverclientuse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
public class UseOneController {
    @Autowired
    RestTemplate restTemplate;

    @RequestMapping("/to_one_test_port")
    public String toOneTestPort(){
        return "eureka-server-client-use ==>"+restTemplate.getForObject("http://eureka-server-client/test_port",String.class);
    }
}
